package mall.mybatis.util;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import mall.pojo.Admin;

public class Test {
	public static void main(String[] args) {
		String mapper = "mall.mapper.AdminMapper.";
		String queryByNamePassword = "getAdminByNamePassword";
		SqlSession session = null;
		List<Admin> admins;
		try {
			session = SessionUtil.getInstance().openSession();
			String statement = mapper + queryByNamePassword;
			admins = session.selectList(statement);
			for(Admin a:admins){
				System.out.println(a);
			}
		} catch (Exception e) {
			throw new RuntimeException(e.getMessage(),e);
		} finally {
			
		}
	}
}
